import { useCookies } from '@vueuse/integrations/useCookies'
import { ADMIN_TOKEN_KEY } from '~/constant'
const cookies = useCookies()

// 获取token
export function getToken() {
    const token = cookies.get(ADMIN_TOKEN_KEY)
    return token
}

// 设置token
export function setToken(token) {
    cookies.set(ADMIN_TOKEN_KEY, token)
}

// 移除token
export function removeToken(token) {
    cookies.remove(ADMIN_TOKEN_KEY)
}